<h1>Listing suppliers</h1>

<%= link_to 'New Manufacturer', new_manufacturer_path %> | <%= link_to 'Back to Appointments List', appointments_path  %></br>


<table border="1">
  <thead>
    <tr>
      <th>Name</th>
      <th>Code</th>
      <th>Website</th>
      <th>Address</th>
      <th>Email</th>
      <th>Phone</th>
      <th>Fax</th>
      <th colspan="2"></th>
    </tr>
  </thead>

  <tbody>
    <% @suppliers.each do |supplier| %>
      <tr>
        <td><%= link_to supplier.name, supplier %></td>
        <td><%= link_to supplier.code, supplier %></td>
        <td><%= supplier.website %></td>
        <td><%= supplier.address %></td>
        <td><%= supplier.email %></td>
        <td><%= supplier.phone %></td>
        <td><%= supplier.fax %></td>
        
        <td><%= link_to 'Edit', edit_supplier_path(supplier) %></td>
        <td><%= link_to 'Destroy', supplier, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>


